Repository navigation
Sync: report product names as ProductID so synced certificates get a template (issue 0097) - #43
Merged
spbsoluble merged 6 commits intoNov 17, 2026
Conversation
…sign synced certificates a template The gateway gives a synced record a certificate profile only when its ProductID equals a configured template's ProductID (a GetProductIds() name) exactly (Gateway-AnyCA-REST CertificateService.CreateOrUpdateDBCertificate, called only from CASyncJob). Both syncs sent CERTInext product codes, which never matched: all 927 sync-created lab rows had no profile, and those certificates reached Command with no template. Each V1/V2 sync pass now reads the account catalog once (on first use) and names a code by productTypeID via the inverse of ProductTypeIdsV2. No fixed code table: the V1-era DefaultProductCodes would label the sandbox's DV 842 'OV SSL'. Unknown codes, types with no plugin product, and an unreadable catalog (one warning) keep the code. The sync summaries gain ProductNames Resolved/Unresolved. GetSingleRecord is unchanged: the gateway doesn't use its ProductID for the mapping. Includes a read-only catalog probe (V1 and V2 catalogs are identical on the sandbox).
…ad-only) Explains why a gateway row isn't re-saved by the sync. Opt-in with CERTINEXT_SYNC_PRODUCTID_PROBE=1 and CERTINEXT_PROBE_ORDERS. Live 2026-11-16: the 8 gateway rows still pending without a profile are all 'Order Cancelled | Rejected due to Order Cancellation' (Track: cancelled), which the sync skips.
… still holds it as pending Both syncs skip orders cancelled or rejected at CERTInext, and the gateway changes a row only when the sync emits a record for it, so an order it held as pending stayed pending indefinitely (8 kfclab rows, all 'Order Cancelled | Rejected due to Order Cancellation', Track: cancelled). Before skipping, the sync now asks the gateway (ICertificateDataReader.GetStatusByRequestID): held as pending -> emit failed with no certificate, once. No row (ArgumentException), already terminal, issued/revoked (never downgraded), no reader, or a lookup error keep the skip. Summaries gain FailedPropagated. Issue 0098.
…ildcard CN A DV/OV request with CN = apex and SAN = *.apex failed with EMS-1173: the wrapper keys "wildcard" on certificate.domain alone and resolved a plain UCC product. Sending the wildcard as the domain is rejected too (EMS-1056, the domain must match the CSR CN). Both confirmed live. With no template ProductCode, the plugin now reads the catalog and sends the account's single active Wildcard UCC product (typeID 21 DV / 22 OV) as X-Product-Code. No match, several matches, a catalog failure, or EV fails before any order is placed, asking for ProductCode. Adds unit coverage and an opt-in live probe (CERTINEXT_V2_WILDCARD_SAN_PROBE).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sync now reports product names (like
DV SSL) asProductIDinstead of CERTInext product codes (like842). The gateway can then match synced certificates to a template.Fixes
ProductIDequals a template's product name. Sync sent the code, so certificates ordered outside Command reached Command with no template.ProductNames: Resolved=…, Unresolved=….GetSingleRecord: unchanged.Testing
DcvSupport=false.SyncProductIdTests:SyncProductIdLiveTests(V1 and V2 sandbox catalogs match), andV2FulfilledPendingSyncLiveTestsnow checks thatProductIDis a name.Other
issues/0097. Stacked on V2 follow-ups round 2: enrollment deadline, report-status conflict, DCV domain lookup cache #41.